System for testing computer application

ABSTRACT

This document discloses a method, apparatus, and computer program product for testing a computer program application in a server computer. The method comprises: receiving, from a client device, a test request requesting the server computer to test suspicious behavior associated with the computer program application; acquiring the computer program application on the basis of the test request; applying at least one test routine to the computer program application and testing for suspicious behavior associated with the computer program application; creating a test report specifying at least some features of the suspicious behavior, if any found during the at least one test routine; and communicating the test report to the client device.

FIELD

The invention relates to the field of computer programs and,particularly, a system for testing a computer application.

BACKGROUND

With the emergence of personal smart computing devices such as smartphones and tablet computers, new types of applications have alsoappeared. Today, there are several applications stores and users want toselect and install the applications on their devices. Applications insuch stores are provided by different vendors or individual persons.This may raise a security concern, because a user installing theapplication has limited ability to verify whether or not the applicationis provided by a trusted vendor and because making the applications isrelatively easy. This may open up a venue for malicious or ignorantvendors or individual people to offer applications that may be referredto as malicious software (malware). Security risk is raised by the factthat mobile computing devices have limited or no anti-malware software.

BRIEF DESCRIPTION

According to an aspect, there is provided a method for testing acomputer program application in a server computer, the methodcomprising: receiving, from a client device, a test request requestingthe server computer to test suspicious behaviour associated with thecomputer program application; acquiring the computer program applicationon the basis of the test request; applying at least one test routine tothe computer program application and testing for suspicious behaviourassociated with the computer program application; creating a test reportspecifying at least some features of the suspicious behaviour, if anyfound during the at least one test routine; and communicating the testreport to the client device.

According to another aspect, there is provided an apparatus comprisingat least one processor; and at least one memory storing a computerprogram code. The at least one memory and the computer program code areconfigured, with the at least one processor, to cause the apparatus to:receive, from a client device, a test request requesting the apparatusto test suspicious behaviour associated with a computer programapplication; acquire the computer program application on the basis ofthe test request; apply at least one test routine to the computerprogram application and test for suspicious behaviour associated withthe computer program application; create a test report specifying atleast some features of the suspicious behaviour, if any found during theat least one test routine; and communicate the test report to the clientdevice.

According to yet another aspect, there is provided a computer programproduct embodied on a non-transitory distribution medium readable by acomputer and comprising program instructions which, when loaded into anapparatus, execute a computer process comprising: receiving, from aclient device, a test request requesting the apparatus to testsuspicious behaviour associated with a computer program application;acquiring the computer program application on the basis of the testrequest; applying at least one test routine to the computer programapplication and testing for suspicious behaviour associated with thecomputer program application; creating a test report specifying at leastsome features of the suspicious behaviour, if any found during the atleast one test routine; and communicating the test report to the clientdevice.

Embodiments of the invention are defined in the dependent claims.

LIST OF DRAWINGS

Embodiments of the present invention are described below, by way ofexample only, with reference to the accompanying drawings, in which

FIGS. 1A and 1B illustrate computing environments to which embodimentsof the invention may be applied;

FIG. 2 illustrates a signaling diagram for testing an applicationaccording to an embodiment of the invention;

FIGS. 3 and 4 illustrate a procedure for providing a subscriptionservice and retesting the application upon detecting a change in atesting configuration according to some embodiments of the invention;

FIG. 5 is a flow diagram of a process for dynamic testing of theapplication according to an embodiment of the invention;

FIG. 6 is a flow diagram of a process for intercepting encrypted datatraffic sent by the application according to an embodiment of theinvention;

FIG. 7 is a flow diagram of a process for static testing of theapplication according to an embodiment of the invention; and

FIG. 8 illustrates a block diagram of a structure of an apparatusaccording to an embodiment of the invention.

DESCRIPTION OF EMBODIMENTS

The following embodiments are exemplary. Although the specification mayrefer to “an”, “one”, or “some” embodiment(s) in several locations, thisdoes not necessarily mean that each such reference is to the sameembodiment(s), or that the feature only applies to a single embodiment.Single features of different embodiments may also be combined to provideother embodiments. Furthermore, words “comprising” and “including”should be understood as not limiting the described embodiments toconsist of only those features that have been mentioned and suchembodiments may contain also features/structures that have not beenspecifically mentioned.

FIG. 1A illustrates a computing environment to which embodiments of theinvention may be applied. Embodiments of the invention provide a systemfor checking for suspicious behaviour of a computer program applicationin a secured environment. The secured environment may be created in aserver computer 104 running sophisticated monitoring software configuredto monitor for the behaviour of the application that may be calledsuspicious. In an embodiment, the server computer 104 may assign atleast some of the monitoring task(s) to further computers. Thesuspicious may refer to features or operations that are beyond of whatthe user expects from the application. Typical suspicious behaviour maycomprise the application stealing data from the user's personalcomputing device, making payments without user consent using the user'spersonal computing device for e-mail spamming or for other illegalactivity, or the suspicious features may comprise software licenses orother obligations that the user may not expect.

The user may provide the application for testing for the suspiciousbehaviour in the server computer 104 before installing the applicationto the user's own personal computing device 100. In another embodiment,a creator of the application may provide the application for the sametesting in order to verify that the application complies with requiredsecurity standards and to check for various security vulnerabilities inthe application. Referring to FIG. 1A the user may use his/her personalcomputing device 100 to communicate with the server computer over anetwork 102, e.g. the Internet or another computer network, and send atest request to the server computer 104 to request the server computer104 to test the indicated application for the suspicious behaviour. Thetest request may comprise one or more messages transferred between thepersonal computing device 100 and the server computer 104. In theembodiment of FIG. 1A, the user may upload the application in connectionwith the request from the personal computing device 100 to the servercomputer. The application uploaded from the mobile computing device 100to the server computer 104 may comprise an installation package of theapplication or the application in another compact typically used to packthe application prior to installing it.

In the embodiment of FIG. 1B, the user may provide the server computer104 with a uniform resource identifier (URI) specifying a location fromwhere the server computer 104 may retrieve the application. Theapplication may in this embodiment be located in a different computer110 than that used by the user to send the test request. The computer110 storing the application may be an application store or anotherserver computer, for example. The URI may be an uniform resource locatorspecifying the location of the application explicitly in the computernetwork, or it may be another identifier that explicitly identifies theapplication requested for testing. The identifier may be a name of theapplication in a specific application store, for example. In any case,the server computer uses the URI received from the personal computingdevice to retrieve the application from the computer 110 storing theapplication, e.g. the installation package of the application.

The personal computing device 100 may be a personal computer (PC), adesktop computer, a laptop computer, a palm computer, a smart phone, atablet computer, or another computer. In general, the personal computingdevice 100 may be called a client device in the sense that it is aclient that receives an application testing service from the servercomputer 104. The server computer 104 may be a network server connectedto the computer network 102. The server computer may provide the user ofthe personal computing device with a web-based interface (in hypertextmarkup language, for example) for sending the test request and providingthe application for testing. The personal computing device 100 and theserver computer 104 are preferably two physically separate devices.

FIG. 2 illustrates a signaling diagram of a procedure for testing theapplication for the suspicious behaviour according to an embodiment ofthe invention. The procedure comprises operations performed by theclient device 100, operations performed by the server computer 104, andcommunication between the client device 100 and the server computer 104.

Referring to FIG. 2, the client device 100 receives an input for testingwhether or not suspicious behaviour is associated with a computerprogram application (block 200). The input may be a user input receivedthrough a user interface of the client device 100. The user input mayrelate to the user accessing the server computer 104 and instructing theclient device to prepare the above-described test request and toretrieve a resource of the application to be tested. The retrieval ofthe resource may be retrieval of the application from a memory locationof the client device 100 or retrieval of an URI of the application. Instep 202, the client device 100 sends the test request and the resourceof the application to the server computer 104, and the server computerreceives the test request. In block 204, the server computer 104acquires the computer program application on the basis of the testrequest. In the embodiment where the client device uploads theapplication together with the test request, the server computer 104receives the application directly from the client device 100. In theembodiment where the client device provides the URI of the application,the server computer accesses the URI and transfers the application fromanother computer 110 storing the application.

In block 206, the server computer applies at least one test routine tothe application and tests the application for suspicious behaviour. Theserver computer 104 may store a database specifying features of thesuspicious behaviour used as input reference parameters for the testroutine(s). The test routine(s) may check the application for thefeatures defined in the database. Below, detailed examples of thesuspicious features operations are described. The test routines maycomprise computer program modules executed in the server computer totest the application. Each test routine may check the application forone or more types of the suspicious behaviour. On the basis of theexecution of the test routines, the server computer 104 creates a testreport specifying at least some features of the suspicious behaviour(block 208), if any found during the test routines. The test report mayspecify whether or not the application is known to carry out maliciousoperation, whether or not the application contains licenses obligatingthe user, whether or not the application contains securityvulnerabilities that may be exploited by a malware or an adversary (amalicious entity or party), whether or not the application containscertificates that come from untrusted parties, etc. The details of thetest report may depend on the embodiment, the level of detail requestedby the client device 100, etc., but preferably the test report comprisemore information than a simple indication of whether or not theapplication comprises suspicious behaviour. In step 210, the servercomputer 104 sends the test report to the client device 100, and theclient device 100 receives the test report. The client device 100outputs the test report to the user in block 212, e.g. through the userinterface. The test report may be provided during the same computersession in which the client device sends the test request, or the servercomputer 104 may send the test report after the session has ended, e.g.after the user has logged out from the session. The test report or anotification of the completion of the test report may be sent to theuser via e-mail, for example, and/or the user may acquire the testreport by logging onto his/her account in the server computer 104 later.

In the embodiments where the server computer uses worker computer tocarry out the actual testing, the server computer may assign the atleast one test routine to the application and instruct the workercomputer(s) to carry out the actual testing and notify the completion ofthe testing to the server computer 104. The server may then acquire orcreate the test report.

In an embodiment, the server computer provides the user with asubscription to a long-term application testing service. The long-termmay be defined to last for a longer term than the procedure of FIG. 2,i.e. the subscription may last beyond the provision of the single testreport. FIG. 3 illustrates a procedure for applying the long-termsubscription. Referring to FIG. 3, the user of the client device 100 isregistered to a long-term application testing service in step 300. Thismay comprise creating a user account, storing in the user account usercredentials and identifier of at least one application associated withthe application testing service. In block 302, the server computer teststhe application for the suspicious behaviour and provides the testreport. Block 302 may comprise substantially the operations performed inthe procedure of FIG. 2. The server computer may store contents of thetest report, any test configurations, final test results, intermediatetest results, any detected features or functions of the application, orany other relevant test information in a test result database for laterretrieval.

After a given time has elapsed after the provision of the test report,the server computer may detect a change in the testing configuration ofthe application tested in block 302 or, in general, any applicationstored in any user account in the server computer (block 304). Thechange may be notified by the user, or the server computer 104 maydetect the change on its own. In block 306, the server computer 104determines whether or not the change affects the contents of the testreport. In some embodiments, the server computer may rerun at least someof the test routines or new test routines, while in other embodimentsthe server computer 104 may determine the changes to the test resultfrom the contents of the test result database. Upon determining that thechange affects the contents of the test report, the server computer 104may update the test report by taking into account the changes in thetesting configuration and communicate the updated test report to theuser's client device 100 in step 308.

With the subscription service, the user receives up-to-date informationon the new suspicious features of the application being tested wheneverthe testing configuration changes. Accordingly, when the updated testreport shows new suspicious features that the user wishes to avoid, theuser may immediately choose to remove the application (consumer point ofview) or modify the application (vendor point of view).

FIG. 4 illustrates an embodiment of block 306. In block 400, it isdetermined what type of change in the testing configuration has beendetected. If the change is a change in the application itself, e.g. anew version of the application, the server computer 104 may carry outthe test routines for the version of the application (block 402). If thechange in the testing configuration comprises new test routines orchanged test routines, the server computer may test the application withthe new/changed test routines. If the change in the testingconfiguration comprises changes in the definitions of the suspiciousbehaviour, e.g. changes in malware definitions, the server computer 104may determine whether or not the new definitions affect the test report(block 406). Block 406 may comprise carrying out at least some the testroutines that use the new or changed definitions but, in some cases, theexecution of the test routines is not necessary. For example, the testresult database may comprise information on certificates comprised inthe application, and if the change in the definitions is a change of acertificate from “trusted” to “untrusted”, there is no need to carry outa test routine. Similarly, if the test result database comprisesinformation on hosts that the application contacts during its operationand the change in the definitions is a change of a host from “trusted”to “suspicious”, there is no need to carry out the test routines again.Accordingly, if the change in the definitions is a change insuspiciousness status of an instance used in testing the application,the retesting may be omitted. On the other hand, if the change in thedefinitions comprises new definitions or definitions whose effect on thetest report cannot be derived without retesting, at least some of thetest routines may be rerun in block 406. For example, if an applicationhas contained a component or an operation that has not been identifiedor monitored and a new definition for a component or an operationbecomes available, the testing may be rerun. The changed definitions maycomprise at least one of the following: new known malicious sites orhacking attacks to sites accessed by the application, new securityvulnerabilities become available for components (e.g. libraries) of theapplication, new more secure versions of used components becomeavailable, new known compromised (root) certificates, a new knownmalicious activity pattern, e.g. a malicious access to a specific fileor a malicious system call, a new information on a service on which theapplication is dependent, e.g. such a service becoming unavailable.

Naturally, if the change comprises a plurality of above-mentionedchanges, a corresponding combination of blocks 402 to 406 may be carriedout. From the blocks 402 to 406, the process proceeds to block 408. Ifthe change in the testing configuration changes the contents of the testreport (block 408), the server computer 104 may change the test reportaccordingly and send the updated test report to the client device 100(block 410).

In general, when the server computer detects a change in a testingconfiguration, it may first determine application(s) affected by thechanged testing configuration. When the change is the new version of anapplication, only the revised application is affected. On the otherhand, when the change is in the test routines or in the definitions, oneor a plurality of applications may be affected and, accordingly, theserver computer 104 may determine the applications associated with thechanged test routines and/or the changed definitions. Then, the servercomputer may determine the user(s) of the affected application(s) on thebasis of a database storing associations between the applications andthe users that have requested to test their applications. Upondetermining the user(s) that have been associated with the affectedapplications, the server computer 104 may determine those users thathave a valid subscription for the long-term testing service. The servercomputer may then send the updated test report to only those users thathave the valid subscription. To the other users, the server computer mayautomatically send a notification that the test configuration of theapplication has changed and that the new test report is available uponvalidating the subscription.

Let us now consider some embodiments of the invention for testing theapplication in the server computer with reference to FIGS. 5 to 7. Inthe embodiments of FIGS. 5 and 6, the server computer 104 installs theapplication, executes it, and monitors its operation for the suspiciousbehaviour. In the embodiment of FIG. 7, the server computer 104 breaksdown the application in to its components, in order to detect suspiciouscomponents in the computer program code.

Referring to FIG. 5, upon acquiring the installation package of theapplication, the server computer 104 installs the application to theserver computer 104 in block 500. The application may be installed to avirtual machine or an emulator operated in the server computer 104. Thevirtual machine or the emulator may represent the environment to whichthe application is designed, e.g. an operating system or a platform. Thevirtual machine or the emulator may correspond to a system architectureof the client device 100 in the embodiments where the user intents toinstall the application to the client device 100. It should, however, beappreciated that in other embodiments, the virtual machine or theemulator may correspond to an architecture different from that of theclient device 100, e.g. when the user is the vendor. The virtual machineor the emulator may be created by a computer program executed by theserver computer 104.

In block 502, the server computer executes the installed applicationand, meanwhile, launches in block 504 a test tool configured to executethe plurality of test routines monitoring the operation of theapplication (block 506). Let us now consider some embodiments offunctions monitored by the test routines with reference to block 506 anda definition database 510 stored in a memory unit of the server computer104. The definition database may comprise reference definitions for thesuspicious behaviour in terms of suspicious URLs (uniform resourcelocator), suspicious network ports, suspicious application ports,suspicious hosts, suspicious geographical locations accessed, suspiciouscertificates, suspicious file accesses (read, write, modify), suspicioussystem calls, suspicious contents of transferred data, suspiciousfeatures in files used, suspicious dependency on a service, etc. Thetest tool may comprise at least one test routine to test for whether ornot the application comprises suspicious behaviour defined by thedefinition database 510. A test routine may monitor the network activityof the application. The test routine may monitor the URLs accessed bythe application and compare the accessed URLs with the suspicious URLscomprised in the definition database. The test routine may store theaccessed URLs in the test result database and write to the test report anotification if a suspicious URL has been found. The test routine maycheck the geographical location of the accessed URLs in order to detectwhether or not the application accesses to unallowed geographicallocations, e.g. hostile or malicious countries. The same or a differenttest routine may monitor network and/or application ports opened by theapplication and used in the operation. Malware may be known to usecertain ports and/or IP addresses, and the definition database may storesuch information. This test routine may compare the port(s) and/or IPaddresses used by the application with the suspicious ports and/or IPaddresses, respectively, store the used ports and/or IP addresses in thetest result database and include any suspicious ports and/or IPaddresses in the test report.

The above-mentioned or a different test routine may monitor the contentsof the network traffic transferred by the application. The test routinemay apply a keyword or a string pattern search to the transferred datain order to detect whether or not the application transfers maliciousdata. The test routine may, for example, create a contact database, e.g.a phone book or an address list, and monitor the traffic for any stringpatterns comprised in the contact database in order to detect whether ornot the application sends the contact database in a malicious manner.Similarly, the test routine may create an artificial credit card numberand monitor whether or not the application attempts to make paymentswith the credit card number. In general, the test routine may detectwhether or not the application transfers data that it should nottransfer by definition. The test routine may store at least someidentifiers or snap shots of the transferred data in the test resultdatabase and, if the application is detected to transfer datamaliciously, the test routine may store a corresponding record in thetest report.

A test routine may check what certificates or root certificates theapplication uses and compare the certificates with the suspiciouscertificates comprised in the definition database. The suspiciouscertificates may comprise expired certificates, self-signedcertificates, certificates provided by a suspicious party, etc. The testroutine may store the used certificates in the test result database andinclude the suspicious certificates in the test report.

A test routine may monitor content (MIME) or file accesses performed bythe application. For example, if the application registers to the systemas handling certain media or file types, e.g. portable document formatfiles, the test routine may monitor whether or not the file accessescomprise malicious features or security vulnerabilities. The maliciousfeatures or security vulnerabilities may be defined by the definitiondatabase, and the test routine may attempt to detect this type ofbehaviour. The test routine may include in the test report any maliciousfeatures, attack vectors or surfaces, and/or security vulnerabilitiesdetected.

A test routine may monitor system calls performed by the application.The definition database 510 may store suspicious system calls orcombinations of suspicious system calls, and the test routine maycompare the system calls performed by the application with thesuspicious system calls. A system call may be defined as a call from theapplication to an operating system of the virtual machine or theemulator. The test routine may store the system calls in the test resultdatabase and include any suspicious system calls in the test report.

A test routine may monitor the dependency of the application on externalweb services. This may be part of monitoring the network activity or aseparate test routine. The definition database 510 may store definitionson suspicious web services. The test routine may store in the testresult database the web services used by the application and, ifsuspicious web services were found, the test routine may include them inthe test report.

In an embodiment, at least one test routine provides a stimulus to theapplication and monitors for the response to the stimulus. The stimulusmay comprise the above-mentioned credit card number or a telephonenumber, and the test routine may monitor whether or not the applicationapplies suspicious operations to the stimulus, e.g. tries to send thetelephone number to a suspicious host. The stimulus may comprise userinputs, e.g. arbitrary string inputs in order to detect whether or notthe application monitors the words input by the user, or it may compriseother user input in order to detect any suspicious responses. Thestimulus may comprise establishment of a communication connection, e.g.a voice call or a short message, and monitoring the response of theapplication to the communication connection. The stimulus may compriserunning a boot sequence and monitoring how the application performsduring the boot, e.g. whether or not the application makes any maliciousoperations during the boot. The stimulus may comprise network events,e.g. a notification of a discovery of a Wi-Fi network, a base stationsignal of a cellular telecommunication system, or a notification that amobile phone is roaming in a foreign network, and the test routine maymonitor whether or not the application responds in a suspicious mannerto such inputs. The stimulus may comprise a change in a geolocation, andthe test routine may monitor whether or not the change in thegeolocation, e.g. a country, affects the operation of the application ina suspicious manner. In an embodiment, the user may specify what type ofstimuli shall be input to the application during the testing. The testrequest may carry this information.

In an embodiment, a test routine monitors the operation of theapplication by capturing encrypted data transferred by the applicationand by determining on the basis of the captured, decrypted data whetheror not the computer program application behaves suspiciously. The testroutine may gain access to the encrypted data by directing a man in themiddle (MITM) attack to a communication connection or a communicationlink established by the application. FIG. 6 illustrates a flow diagramof a procedure according to this embodiment. The process of FIG. 6 maybe carried out as a part of block 506, for example. Referring to FIG. 6,the test routine detects in block 600 that the tested applicationattempts establishment of a connection to a host. The connection may bea network connection through the Internet, for example, e.g. a transportcontrol protocol/Internet protocol (TCP/IP) connection, universaldatagram protocol (UDP) link, or a real-time protocol (RTP) connection.In block 602, the test routine intercepts the communication linkestablishment procedure by performing a man in the middle attack. As theapplication is executed in the server computer 104, the test routineexecuted by the server computer is able to detect and intercept anymessages transferred by the application, and it is also able to inputarbitrary data to the application. As a consequence, the test routine isable to capture any encryption keys negotiated between the applicationand the host. For example, upon capturing from the application a requestfor the host to provide the host's public key, the test routine may, asa response, input to the application an arbitrary public key of the testroutine itself. The test routine may also install a root certificatethat verifies to the application that the public key belongs to thehost. Therefore, upon the application sending a certification request toa certification authority, the test routine may capture thecertification request and input a certification response to theapplication on the basis of the root certificate. Accordingly, theapplication believes that a trusted party has authenticated the host andthat the application is truly communicating with the host. Then, theapplication encrypts any data it sends with the public key provided bythe test routine, and the test routine may decrypt the encrypted data byusing its private key matched with the public key. In this manner, thetest routine may monitor any encrypted data sent by the application(604). The application may forward the captured data to the host inorder to monitor further behaviour of the application and the furthermessages sent by the application. In another embodiment, the applicationmay prevent the forwarding of the data sent by the application.Similarly, the test routine may capture and monitor the traffic from thehost to towards the application, as conventionally known in connectionwith MITM attacks.

It should be appreciated that although various types of features andactivity have been described herein, the test tool may monitor othertype of activity as well. In block 508, the test report is created andstored in the test result database. With respect to the contents of thetest report in connection with each type of suspicious behaviourdescribed above, the test report may comprise simply a notification ofwhether or not the application has been detected to contain each type ofsuspicious behaviour, or a detailed description of suspicious behaviourmay be provided for each type in the test report. For example, the testreport may comprise a simple notification that the application access toat least one malicious host and, optionally, it may comprise URL(s) ofsuch hosts or other detailed information further defining the suspiciousbehaviour. The level of detail of the test report may be defined by theuser in connection with sending the test request.

The embodiments described above with reference to FIGS. 5 and 6 monitorthe operation of the application. The embodiments of FIGS. 5 and 6 maybe referred to as dynamic scanning for suspicious behaviour. It shouldbe appreciated that embodiments of FIGS. 5 and 6 are directly applicableto the embodiments of FIGS. 3 and 4, i.e. the test routines of FIGS. 5and 6 may be repeated when a change is detected in the testingconfiguration. Another embodiment scans components of the applicationand determines whether or not the application comprises suspiciouscomponents. Such embodiments may be considered to perform staticscanning for the suspicious behaviour, since the embodiments scan thestatic components of the application. FIG. 7 illustrates a flow diagramof this embodiment.

Referring to FIG. 7, upon acquiring the application (block 204) acomponent extraction tool may be launched to determine what componentsthe application comprises (block 700). The searched components maycomprise libraries used by the application. As known in the art, alibrary is a collection of implementations of behaviour, written in acomputer language. The library has an interface for communicating withother computer programs. As a consequence, the library may be consideredas a modular tool that may be used by multiple independent programs. Acomputer program may invoke the library via a function call, forexample. Different libraries provide different functions, and theapplication being tested may utilize the functions provided by thelibraries comprised in the application during its operation. Thecomponent extraction tool may be a computer program executed by theserver computer 104. The server computer 104 may store in its memoryunit a library database 710 storing a reference list of libraries 712,718 the component extraction tool is configured to search. The librarydatabase may comprise for each library 712, 718 reference strings 714,720 that distinguish the library 712, 718 from other libraries. Thecomponent extraction tool may then scan the computer program code of theapplication for these reference strings 714, 720 and, upon detecting astring matching with a reference string, 714, 720, the componentextraction tool may store in a test result database an informationelement indicating that the application comprises the detected library.

In an embodiment, the reference strings 714, 720 are binary strings, andthe component extraction tool is configured to scan a binary computerprogram code of the application for the reference strings. As aconsequence, the component extraction tool may scan compiled computerprogram code translated into a machine language instead of reading asource code of the application, for example.

In an embodiment, the component extraction tool 700 is configured toidentify any software licenses associated with the application. Thelicenses may be determined from the detected libraries and knownlicenses associated with those libraries, or the licenses may bedetected by other means. The library database 710 may store definitionsfor identifying the licenses from the computer program code of theapplication. Similarly, the library database 710 may store definitionsfor identifying any known patent rights etc. associated with thelibraries for use in determining the suspicious features of theapplication.

In an embodiment, the reference list of at least one library 712, 718may be divided into different versions, wherein separate referencestrings 714, 720 and definitions of suspicious features 716, 722 areprovided for each version. An application may contain multiple versionsof the same library, and the component extraction tool may be configuredto detect the different versions and store in the test result databaseinformation on the versions of the same library found in theapplication.

In block 702, upon the component extraction tool has determined thecomponents of the application, the suspicious behaviour associated withthe detected components is determined by cross-referencing the extractedcomponents with the library database 710. The library database 710 maystore in association with each library 712, 718 definitions of thesuspicious behaviour 716, 722, respectively. The definitions maycomprise at least one of the following for each library: known securityvulnerabilities, possible common weakness enumeration (CWE) numbers forthe known security vulnerabilities, known licenses and their terms ofuse, an author of the library and a reputation status of the author, anexport control status of the library indicating whether or not thelibrary may be exported freely, an age or a creation date of thelibrary, a time of last known update of the library, certificatescomprised in the library and a reputation status of the certificatesand/or certificate providers, resources used by the library such asicons or images, network addresses used by the library, names or URLsinside the library, whether or not the library comprises debugginginformation attached to it, popularity of the library, and a messagedigest 5 (MD5) of the library or another factor to detect possibletampering of the library. Block 702 may comprise determining, on thebasis of the definitions of the known suspicious behaviour associatedwith each library, whether or not the libraries comprised in theapplication and detected in block 700 are associated with the suspiciousbehaviour. The result of block 702 may be stored in the test resultdatabase and in the test report (block 704). The test report maycomprise information on libraries that are associated with thesuspicious behaviour and/or what type of suspicious behaviour isassociated with the application and/or individual libraries. Forexample, if one or more of the libraries has been detected to containsecurity vulnerabilities, the test report may be arranged to compriseinformation on the type of security vulnerability, e.g. whether or notthe library or the application is detected to be malicious orsusceptible to malicious attacks. As another example, if one or morelibraries are detected that are under a license, the test report maycomprise information on the license terms or a reference to a web sitewhere the license terms are listed. Similar procedure may be applied tolibraries that are subject to patent rights. Table 1 below shows anembodiment of some contents of the test report.

TABLE 1 Libraries with Known Vulnerabilities openssl 0.9.8j 30vulnerabilities libtiff  9 vulnerabilities libtiff version 3.8  8vulnerabilities libpng 10 vulnerabilities Libraries without KnownVulnerabilities libjpeg — sqlite3 — Licenses with Significant ConditionsLicense 1 Obligation to release source code Licenses without SignificantConditions License 2 —

The embodiment of FIG. 7 may be directly combined with the embodimentsof FIGS. 3 and 4, e.g. when there is a change in the testingconfiguration, the server computer 104 may determine the effect of thechange on the test report and update the test report accordingly. Forexample, if the application version changes, the process of FIG. 7 maybe executed again in order to determine what new libraries or componentsare comprised in the new version of the application and whether or notthe status of the suspicious behavior of the application indicated inthe test report has changed. Similarly, if new information on thelibraries is acquired and the definitions 716, 722 change, e.g. newvulnerabilities are found in a library or new versions of the librarieshave become available, the server computer 104 may determine its effecton the test report, update the test report, and send the updated testreport to the user. In general, the server computer 104 may determinethe applications that are affected by the change, update their testreports and test result databases, and send the updated test reports tothe users that have a valid subscription.

FIG. 8 illustrates a block diagram of a structure of an apparatusaccording to an embodiment of the invention. The apparatus may becomprised in the server computer 104. The apparatus may be a computer,e.g. a network server or a workstation computer, comprising at least oneprocessor 10 and at least one memory 20 including a computer programcode 24, wherein the at least one memory 20 and the computer programcode 24 are configured, with the at least one processor 10, to cause theapparatus to carry out the steps of the process of FIG. 2 executed bythe server computer or any one of the embodiments described above andexecuted by the server computer 104.

Referring to FIG. 8, the apparatus comprises a communication unit 11operating according to at least one communication protocol. Thecommunication unit 11 may be configured to establish TCP/IP, UDP, or RTPconnections, for example. It should, however, be appreciated that thecommunication protocol used between the client device 100 and the servercomputer 104 does not limit the invention in any way. The apparatus mayfurther comprise the memory 20 comprising the definition database 510used as a reference when monitoring the operation of the application(see description referring to FIGS. 5 and 6) and/or the library database710 storing the reference strings 714, 720 for identifying thecomponents of the application and definitions for suspicious features ofeach component. The memory 20 may further store a subscription database22 storing information on the users subscribed to the testing service(e.g. contact details), applications tested and associations between theapplications and the users, the type of subscription for each user (e.g.long-term continuous subscription spanning over multiple test operationsor a one-shot subscription consisting of one testing of an application).The memory 20 may further store computer program code 24 defining theoperation of the server computer 104 in connection with testing theapplications, handling the subscriptions, updating the testingconfiguration, etc. The memory 20 may further comprise the test resultdatabase 26 storing any information acquired during the testing of theapplication, as described above.

The apparatus may further comprise the processor 10 or a processingcircuitry 10 configured to carry out the test operations and provide thetesting service, as described above. The processor may be considered toencompass all of the following: (a) hardware-only circuitimplementations such as implementations in only analogue and/or digitalcircuitry; (b) combinations of circuits and software and/or firmware,such as (as applicable): (i) a combination of processor(s) or processorcores; or (ii) portions of processor(s)/software including digitalsignal processor(s), software, and at least one memory that worktogether to cause an apparatus to perform specific functions; and (c)circuits, such as a microprocessor(s) or a portion of amicroprocessor(s), that require software or firmware for operation, evenif the software or firmware is not physically present. This definitionof the “processor” applies to all uses of this term. As a furtherexample the term “processor” would also cover an implementation ofmultiple processors or portion of a processor, e.g. one core of amulti-core processor, and its (or their) accompanying software and/orfirmware. It may be understood to encompass also an application-specificintegrated circuit (ASIC), and/or a field-programmable grid array (FPGA)circuit for the apparatus according to an embodiment of the invention.

The processor 10 may acquire the application to be tested through thecommunication unit 11 from the client device 100 or from an URIspecified by the client device 100. The processor 10 may comprise orperform functions of a dynamic test engine 14 configured to install theapplication, execute the application, and monitor the operation of theapplication, as described above with reference to FIGS. 5 and 6. Thedynamic test engine may access the definition database 510 in order toidentify the suspicious behaviour in the operation of the application.The processor 10 may comprise or perform functions of a static testengine 16 configured to detect the components of the application fromthe computer program code of the application and to detect suspiciousbehaviour associated with the detected components, as described abovewith reference to FIG. 7. The static test engine 16 may access thelibrary database 710 in order to identify the suspicious behaviour inthe components of the application. It should be appreciated that theprocessor may comprise one of the dynamic test engine 14 and the statictest engine 16, both of them, or even another type of test engineconfigured to test the application and detect suspicious behaviourassociated with the application. The test engines 14, 16 may update thetest result database as they test the application. They may store in thetest result database 26 detected suspicious behaviour of the applicationbut also any information describing the operation and/or the componentsof the application, e.g. network activity, accessed sites, accessedfiles, system calls, certificates of the application, etc.

The processor 10 may comprise or execute functions of a test controller18 controlling the overall operation of the testing. The test controller18 may carry out the communication with the client device 104, receivethe test request and update the subscription database with the contentsof the test request, e.g. create a new client profile, updateapplications tested for the user, etc. The test controller 18 mayacquire the application to be tested and, upon acquiring theapplication, launch the dynamic test engine 14 and/or the static testengine 16. When the test controller 18 receives a notification from thetest engine(s) 14, 16 that the testing is complete, the test controllermay launch a test report generator 12 configured to create the testreport. The test report generator may access the test result database 26and acquire all the information comprised in the test result database 26or a subset of the information contained in the test result database andadd the acquired information to the test report. The test reportgenerator 12 may use a default template for the contents of the testreport, or the test report generator may select the information to beinserted to the test report on the basis of user preferences receivedfrom the client device 100. Upon completing the test report, the testreport generator 12 may control the communication unit 11 to send thetest report to the client device 100 over the communication connectionestablished before sending the test request, or store the test report inthe test subscription database and notify the user of the completed testreport, e.g. via e-mail. Accordingly, the testing may be carried outonline while the user is waiting, or it may be carried offline, e.g. theconnection between the client device and the server computer may beterminated, and the test report may be sent over another connection.

The test controller 18 may further comprise an event detector 15configured to monitor the testing configurations and to alert the testcontroller 18 upon detecting a change in a testing configuration of anyapplication, e.g. new application version, installation of new testroutines to the test engines 14, 16, updates in the definition databases510, 710, etc. As a result, the test controller may start a procedure todetermine whether or not the changes affect the test results, e.g.whether or not there is a need to carry out retesting at least on somelevel. Above, some embodiments are described, e.g. the retesting maycomprise simple update of the test report(s) when a certificate changesfrom trusted to untrusted or vice versa, or the retesting may compriselaunching the test engine(s) 14, 16 to carry out retesting of theapplication. When the retesting causes a change in a test report sent toa user having a valid subscription, the test controller 18 may controlthe communication unit 11 to transmit a notification about the updatedtest report to the user.

The processes or methods described in connection with FIGS. 2 to 7 mayalso be carried out in the form of one or more computer processesdefined by one or more computer programs. The computer program may be insource code form, object code form, or in some intermediate form, and itmay be stored in some sort of carrier, which may be any entity or devicecapable of carrying the program. Such carriers include transitory and/ornon-transitory computer media, e.g. a record medium, computer memory,read-only memory, electrical carrier signal, telecommunications signal,and software distribution package. Depending on the processing powerneeded, the computer program may be executed in a single electronicdigital processing unit or it may be distributed amongst a number ofprocessing units.

The present invention is applicable to software testing systems. Thealgorithms used, the definitions of the suspicious behaviour, andtesting tools develop rapidly. Such development may require extrachanges to the described embodiments. Therefore, all words andexpressions should be interpreted broadly and they are intended toillustrate, not to restrict, the embodiment. It will be obvious to aperson skilled in the art that, as technology advances, the inventiveconcept can be implemented in various ways. The invention and itsembodiments are not limited to the examples described above but may varywithin the scope of the claims.

The invention claimed is:
 1. A method for testing a computer programapplication in a server computer, the method comprising: having alibrary database comprising library reference strings that distinguisheach library from other libraries, the library database further storingknown suspicious features of libraries; upon receiving a test requestrequesting the server computer to test suspicious behaviour associatedwith the computer program application, performing the method by:acquiring the computer program application on a basis of the testrequest; applying at least one test routine to the computer programapplication and testing for suspicious behaviour associated with thecomputer program application, wherein said testing comprises installingthe computer program application to the server computer, executing thecomputer program application, searching a computer program code of thecomputer program application for the library reference strings,determining one or more libraries invoked by the computer programapplication on the basis of the library reference strings found in thecomputer program code of the computer program application,cross-referencing the library database with the libraries invoked by thecomputer program application and determining, on the basis of thecomparison, whether or not the computer program application comprisesone or more of the suspicious features, monitoring an operation of thecomputer program application and comparing behaviour; creating a testreport specifying at least some of the suspicious features, if any foundduring the at least one test routine, and inserting results of saidmonitoring into the test report; and communicating the test report. 2.The method of claim 1, further comprising in the server computer:subscribing a user of a client device to a testing service of thecomputer program application, wherein the testing service lasts beyondthe communication of the test report; detecting, autonomously by theserver computer, a change in at least one parameter comprised in saidtesting the computer program application; determining whether or not thechanged at least one parameter results in change of contents of the testreport; and upon determining that the change in the at least oneparameter causes a change in the contents of the test report, creating anew test report that takes into account the changed at least oneparameter and communicating the new test report to the client device asa part of the subscription.
 3. The method of claim 2, furthercomprising: detecting said change in a program version of the computerprogram application; applying said at least one test routine to a newversion of the computer program application and testing the suspiciousbehaviour associated with the new version of the computer programapplication; creating said new test report on the basis of the at leastone test routine applied to the new version of the computer programapplication.
 4. The method of claim 2, further comprising: detectingsaid change in the at least one test routine applied to the computerprogram application; applying the changed test routines to the computerprogram application and testing the suspicious behaviour associated withthe computer program application; creating said new test report on thebasis of the changed at least one test routine applied to the computerprogram application.
 5. The method of claim 2, further comprising:detecting said change in definitions of the suspicious behaviour;determining whether or not the definitions cause a change to the testreport; upon determining that the test report changes as a result of thechanged definitions, creating said new test report on the basis of thechanged definitions.
 6. The method of claim 1, said monitoring theoperation of the computer program application comprising: capturingencrypted data transferred by said computer program application bydirecting a man in the middle attack to a communication connectionestablished by the computer program application; and determining on thebasis of the captured data whether or not the computer programapplication behaves suspiciously.
 7. The method of claim 6, furthercomprising: providing the computer program application with a public keyand indicating that the public key belongs to a host to which thecomputer program application established the communication connection;and providing, in connection with the public key, the computer programapplication with a root certificate that verifies that the public keybelongs to the host.
 8. The method of claim 1, wherein the computerprogram code from which reference strings are searched for, is compiledbinary computer code.
 9. The method of claim 1, further comprisingdetermining the libraries comprised in the computer program applicationwithout installing the application to the server computer.
 10. Themethod of claim 1, wherein said applying the at least one test routinecomprises: searching the computer program application for computerprogram licenses associated with said computer program application;determining whether or not licenses associated with the computer programapplication comprise suspicious features; and inserting results of saiddetermining suspicious features of the licenses into the test report.11. The method of claim 1, further comprising: creating, on the basis oftesting the computer program application, a database storing the testresults and specifications identifying the tested computer programapplication; storing the database in the server computer for later use.12. An apparatus comprising: at least one processor; and at least onememory storing a computer program code and a library database comprisinglibrary reference strings that distinguish each library from otherlibraries, the library database further storing known suspiciousfeatures of libraries, wherein the at least one memory and the computerprogram code are configured, with the at least one processor, to causethe apparatus to: receive a test request requesting the apparatus totest suspicious behaviour associated with a computer programapplication; acquire the computer program application on a basis of thetest request; apply at least one test routine to the computer programapplication and test for suspicious behaviour associated with thecomputer program application, wherein said test comprises at least thefollowing performed by the apparatus: installing the computer programapplication, executing the computer program application, searching acomputer program code of the computer program application for thelibrary reference strings, determining one or more libraries invoked bythe computer program application on the basis of the library referencestrings found in the computer program code of the computer programapplication, cross-referencing the library database with the librariesinvoked by the computer program application and determining, on thebasis of the comparison, whether or not the computer program applicationcomprises one or more of the suspicious features, monitoring anoperation of the computer program application and comparing theoperation with known suspicious behaviour; create a test reportspecifying at least some of the suspicious features, if any found duringthe at least one test routine, and insert results of said monitoringinto the test report; and communicate the test report.
 13. The apparatusof claim 12, wherein the at least one memory and the computer programcode are configured, with the at least one processor, to cause theapparatus to: subscribe a user of a client device to a testing serviceof the computer program application, wherein the testing service lastsbeyond the communication of the test report; detect, autonomously, achange in at least one parameter comprised in said testing the computerprogram application; determine whether or not the changed at least oneparameter results in change of contents of the test report; and upondetermining that the change in the at least one parameter causes achange in the contents of the test report, create a new test report thattakes into account the changed at least one parameter and communicatingthe new test report to the client device as a part of the subscription.14. The apparatus of claim 13, wherein the at least one memory and thecomputer program code are configured, with the at least one processor,to cause the apparatus to: detect said change in a program version ofthe computer program application; apply said at least one test routineto a new version of the computer program application and test thesuspicious behaviour associated with the new version of the computerprogram application; create said new test report on the basis of the atleast one test routine applied to the new version of the computerprogram application.
 15. The apparatus of claim 13, wherein the at leastone memory and the computer program code are configured, with the atleast one processor, to cause the apparatus to: detect said change inthe at least one test routine applied to the computer programapplication; apply the changed test routines to the computer programapplication and test the suspicious behaviour associated with thecomputer program application; create said new test report on the basisof the changed at least one test routine applied to the computer programapplication.
 16. The apparatus of claim 13, wherein the at least onememory and the computer program code are configured, with the at leastone processor, to cause the apparatus to: detect said change indefinitions of the suspicious behaviour; determine whether or not thedefinitions cause a change to the test report; upon determining that thetest report changes as a result of the changed definitions, create saidnew test report on the basis of the changed definitions.
 17. Theapparatus of claim 12, wherein the at least one memory and the computerprogram code are configured, with the at least one processor, to causethe apparatus to perform at least the following when monitoring theoperation of the computer program application: capture encrypted datatransferred by said computer program application by directing a man inthe middle attack to a communication connection established by thecomputer program application; and determine on the basis of the captureddata whether or not the computer program application behavessuspiciously.
 18. The apparatus of claim 17, wherein the at least onememory and the computer program code are configured, with the at leastone processor, to cause the apparatus to: provide the computer programapplication with a public key and indicating that the public key belongsto a host to which the computer program application established thecommunication connection; and provide, in connection with the publickey, the computer program application with a root certificate thatverifies that the public key belongs to the host.
 19. A computer programproduct embodied on a non-transitory distribution medium readable by acomputer and comprising program instructions which, when loaded into anapparatus, execute a computer process comprising: storing a librarydatabase comprising library reference strings that distinguish eachlibrary from other libraries, the library database further storing knownsuspicious features of libraries; receiving a test request requestingthe apparatus to test suspicious behaviour associated with a computerprogram application; acquiring the computer program application on abasis of the test request; applying at least one test routine to thecomputer program application and testing for suspicious behaviourassociated with the computer program application, wherein said testingcomprises installing the computer program application, executing thecomputer program application, searching a computer program code of thecomputer program application for the library reference strings,determining one or more libraries invoked by the computer programapplication on the basis of the library reference strings found in thecomputer program code of the computer program application,cross-referencing the library database with the libraries invoked by thecomputer program application and determining, on the basis of thecomparison, whether or not the computer program application comprisesone or more suspicious features, monitoring an operation of the computerprogram application and comparing the operation with known suspiciousbehaviour; creating a test report specifying at least some of thesuspicious features, if any found during the at least one test routine,and inserting results of said monitoring into the test report; andcommunicating the test report to the client device.